package com.xuecheng.content.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xuecheng.content.model.dto.TeachplanDto;
import com.xuecheng.content.model.po.CourseBase;
import com.xuecheng.content.model.po.Teachplan;

import java.util.List;

/**
 * <p>
 * 课程计划 Mapper 接口
 * </p>
 *
 * @author itcast
 */
public interface TeachplanMapper extends BaseMapper<Teachplan> {

    /**
     * @description 查询某课程的课程计划，组成树型结构
     * @param courseId
     * @return com.xuecheng.content.model.dto.TeachplanDto
     * @author Mr.M
     * @date 2022/9/9 11:10
     */
    public List<TeachplanDto> selectTreeNodes(long courseId);


    /**
     * @description: 根据课程计划id查询课程信息
     * @params: [teachplanId]
     * @return:
     * @author: ajie
     * @date: 2024/1/14 21:30
     */
    public CourseBase selectCourseById(Long teachplanId);


    /**
     * @description: 根据课程计划id查询同级排序后一结点的信息
     * @params: [id]
     * @return:
     * @author: ajie
     * @date: 2024/1/15 21:31
     */
    public Teachplan queryGreaterOneById(Teachplan teachplan);

    /**
     * @description: 根据课程计划id查询同级排序前一结点的信息
     * @params: [teachplanOld]
     * @return:
     * @author: ajie
     * @date: 2024/1/15 22:13
     */
    public Teachplan queryLowerOneById(Teachplan teachplanOld);
}
